package com.glp.work.flow.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.glp.work.flow.dto.request.ProcTaskAssignRoleInfoDTO;
import com.glp.work.flow.dto.request.ProcTaskAssignUserInfoDTO;
import com.glp.work.flow.dto.request.ProcTaskNodeInfoDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 流程任务节点信息
 *
 * @author pengjia
 * @version 2020年5月18日 下午3:32:36
 */
@Data
@ApiModel("流程任务节点信息")
public class ProcTaskInfoDTO implements Serializable {

    private static final long serialVersionUID = 2482892756237271449L;
    @ApiModelProperty(value = "任务节点ID")
    private String taskDefId;
    @ApiModelProperty(value = "任务节点名称")
    private String taskDefKey;
    @ApiModelProperty(value = "创建用户")
    private String createUser;
    @ApiModelProperty(value = "更新用户")
    private String updateUser;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "类型：1：用户 0：角色")
    private String type;

    @ApiModelProperty(value = "任务接受用户")
    private List<ProcTaskAssignUserInfoDTO> taskReceiveList = new ArrayList<>();

    @ApiModelProperty(value = "任务接受角色")
    private List<ProcTaskAssignRoleInfoDTO> taskRoleReceiveList = new ArrayList<>();

    @ApiModelProperty(value = "任务可驳回节点")
    private List<ProcTaskNodeInfoDTO> nodeInfos = new ArrayList<>();
    /**
     * 任务分配规则
     */
    @Column(name = "task_def_rule")
    private String taskDefRule;
    /**
     * 是否可批量审批
     */
    @Column(name = "task_def_batch")
    private String taskDefBatch;

    /**
     * 关联表单
     */
    @Column(name = "task_def_form")
    private String taskDefForm;
    /**
     * 节点类型
     */
    @Column(name = "task_def_type")
    private String taskDefTtpe;
    /**
     * 待办通知 0不通知1通知
     */
    @ApiModelProperty(value = "待办通知 0不通知1通知")
    private String notification;
    /**
     * 订阅提醒类型  10 待审批通知，20 通过通知，30 拒绝通知，40 驳回通知
     */
    @ApiModelProperty(value = "订阅提醒类型  10 待审批通知，20 通过通知，30 拒绝通知，40 驳回通知")
    private String notificationType;

    /**
     * 通知提交人 0不通知1通知
     */
    @ApiModelProperty(value = "通知提交人 0不通知1通知")
    private String noticeCreateUserSwitch;

    @ApiModelProperty(value = "订阅分配用户信息")
    private List<ProcTaskAssignUserInfoDTO> subscriptionUserInfos = new ArrayList<>();

    @ApiModelProperty(value = "订阅分配角色信息")
    private List<ProcTaskAssignRoleInfoDTO> subscriptionRoleInfos = new ArrayList<>();

    @ApiModelProperty(value = "是否发送短信验证码0：关，1：开")
    private String sms;

    @ApiModelProperty(value = "审批页面可以做的操作，PASS：通过，FAIL：拒绝，REJECT：驳回")
    private List<String> optionType;

}
